<script src="http://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript">
    google.load("language", "1");
</script>
<script type="text/javascript">
    function traducir(){
        google.language.translate(document.getElementById('msg').value, 'es', 'en', function(result) {
            document.getElementById('en').value=result.translation;
        });
        google.language.translate(document.getElementById('msg').value, 'es', 'it', function(result) {
            document.getElementById('it').value=result.translation;
        });
        google.language.translate(document.getElementById('msg').value, 'es', 'pt', function(result) {
            document.getElementById('pt').value=result.translation;
        });

        google.language.translate(document.getElementById('msg_s').value, 'es', 'en', function(result) {
            document.getElementById('msg_s_en').value=result.translation;
        });
        google.language.translate(document.getElementById('msg_s').value, 'es', 'it', function(result) {
            document.getElementById('msg_s_it').value=result.translation;
        });
        google.language.translate(document.getElementById('msg_s').value, 'es', 'pt', function(result) {
            document.getElementById('msg_s_pt').value=result.translation;
        });
    }
</script>



<div class="yui-g">
    <div><!-- categorias -->
        <div class="rounded linea">
            <table border="0" width="100%">
                <tr valign="top">
                    <?php
                    $this->modelo_ec->get_articulo($producto);
                    ?>
                    <td>
                        <form action="<?=base_url()?>index.php/admin/categorias/crear_articulo" method="post">
                            <table border="0">
                                <tr>
                                    <td align="right">Codigo</td>
                                    <td><input type="text" name="product_sku" size="10" value="<?=$this->modelo_ec->product_sku;?>"></td>
                                </tr>
                                <tr>
                                    <td align="right">SEO</td>
                                    <td><input type="text" name="product_seo" size="10" value="<?=$this->modelo_ec->product_seo;?>"></td>
                                </tr>
                                <tr>
                                    <td align="right">Nombre</td>
                                    <td><input type="text" name="product_name" size="10" value="<?=$this->modelo_ec->product_name;?>"></td>
                                </tr>
                                <tr>
                                    <td align="right">Stock</td>
                                    <td><input type="text" name="product_in_stock" size="10" value="<?=$this->modelo_ec->product_in_stock;?>"></td>
                                </tr>
                                <tr>
                                    <td align="right">Precio</td>
                                    <td><input type="text" name="product_price" size="10" value="<?=$this->modelo_ec->product_price;?>"></td>
                                </tr>
                                <tr>
                                    <td align="right">Ofertas</td>
                                    <td><input type="text" name="product_discount_id" size="10" value="<?=$this->modelo_ec->product_discount_id;?>">1=Muestra producto en Ventana de Ofetas Campo vacio no lo muestra</td>
                                </tr>
                                <tr>
                                    <td align="right">Disponibilidad</td>
                                    <td><input type="text" name="custom_attribute" size="10" value="<?=$this->modelo_ec->custom_attribute;?>">1=Inmediata 2=48 horas 3=Agotado</td>
                                </tr>
                                <tr>
                                    <td align="right">Publicado</td>
                                    <td><input type="text" name="product_publish" size="10" value="<?=$this->modelo_ec->product_publish;?>">Y=si N=no</td>
                                </tr>
                                <tr>
                                    <td align="right">Descripcion Espanol <a href="#" onclick="traducir();">Traducir</a></td>
                                    <td>
                                        Descripcion Corta:<input type="text" id="msg_s" name="msg_s" value="<?=$this->modelo_ec->desc_s;?>"><br>
                                        <textarea cols="60" rows="20" id="msg" name="msg"><?=$this->modelo_ec->desc;?></textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">Descripcion Ingles</td>
                                    <td>
                                        Descripcion Corta:<input type="text" id="msg_s_en" name="msg_s_english" value="<?=$this->modelo_ec->desc_s_english;?>"><br>
                                        <textarea cols="60" rows="20" id="en" name="msg_english"><?=$this->modelo_ec->desc_english;?></textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">Descripcion Italiano</td>
                                    <td>
                                        Descripcion Corta:<input type="text" id="msg_s_it" name="msg_s_italy" value="<?=$this->modelo_ec->desc_s_italy;?>"><br>
                                        <textarea cols="60" rows="20" id="it" name="msg_italy"><?=$this->modelo_ec->desc_italy;?></textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right">Descripcion Portugues</td>
                                    <td>
                                        Descripcion Corta:<input type="text" id="msg_s_pt" name="msg_s_portugues" value="<?=$this->modelo_ec->desc_s_portugues;?>"><br>
                                        <textarea cols="60" rows="20" id="pt" name="msg_portugues"><?=$this->modelo_ec->desc_portugues;?></textarea>
                                    </td>
                                </tr>
                                <tr>
                                    <td>
                                        <?php
                                        $atts = array(
                                            'width' => '400',
                                            'height' => '500',
                                            'scrollbars' => 'yes',
                                            'status' => 'yes',
                                            'resizable' => 'yes',
                                            'screenx' => '0',
                                            'screeny' => '0'
                                        );

                                        echo anchor_popup(base_url()."index.php/admin/categorias/upload_image/".$this->modelo_ec->product_id, "Upload file", $atts)."<br>";
                                        echo anchor_popup(base_url()."index.php/admin/categorias/upload_image/".$this->modelo_ec->product_id."_a", "Upload file a", $atts)."<br>";
                                        echo anchor_popup(base_url()."index.php/admin/categorias/upload_image/".$this->modelo_ec->product_id."_b", "Upload file b", $atts)."<br>";
                                        echo anchor_popup(base_url()."index.php/admin/categorias/upload_image/".$this->modelo_ec->product_id."_c", "Upload file c", $atts)."<br>";
                                        ?>

                                        <div id=”file_info”>
                                            <img src="<?=base_url();?>thumb/<?=$this->modelo_ec->product_id?>.jpg" alt="Imagen" title="Imagen" />
                                            <img src="<?=base_url();?>thumb/<?=$this->modelo_ec->product_id?>_a.jpg" alt="Imagen" title="Imagen" />
                                            <img src="<?=base_url();?>thumb/<?=$this->modelo_ec->product_id?>_b.jpg" alt="Imagen" title="Imagen" />
                                            <img src="<?=base_url();?>thumb/<?=$this->modelo_ec->product_id?>_c.jpg" alt="Imagen" title="Imagen" />
                                        </div>
                                    </td>
                                </tr>
                                <tr>
                                    <td>Cantidad de Imagenes</td>
                                    <td><input type="text" name="product_full_image" size="10" value="<?=$this->modelo_ec->product_full_image;?>"></td>
                                </tr>
                                <tr>
                                    <td>
                                        <input type="hidden" name="id_category" value="<?=$category;?>">
                                        <input type="hidden" name="product_id" value="<?=$this->modelo_ec->product_id;?>">
                                        <input type="submit" value="Agregar Articulo">product_category
                                    </td>
                                </tr>
                            </table>
                        </form>
                    </td>
                </tr>
            </table>
        </div>
    </div><!-- categorias end -->
</div>